package com.github.prontera.config;

import lombok.EqualsAndHashCode;
import lombok.ToString;

import org.springframework.boot.context.properties.ConfigurationProperties;

/**
 * @author Alex
 */

@ToString
@EqualsAndHashCode
@ConfigurationProperties(prefix = ManualExceptionProperties.PREFIX)
public class ManualExceptionProperties {

	public static final String PREFIX = "microservice.exception";

	/**
	 * 是否启用随机异常
	 */
	private boolean enabled;

	/**
	 * 当对此数取余为0就会抛出异常
	 */
	private int factor;

	public boolean isEnabled() {
		return enabled;
	}

	public void setEnabled(boolean enabled) {
		this.enabled = enabled;
	}

	public int getFactor() {
		return factor;
	}

	public void setFactor(int factor) {
		this.factor = factor;
	}

}
